package net.loyintean.pearlshell.validation.field;

import net.loyintean.pearlshell.validation.IValidField;
import net.loyintean.pearlshell.validation.IValidRuleConfig;

public class ValidField implements IValidField {

	private final Object value;

	private final String name;

	private final IValidRuleConfig[] configs;

	public ValidField(Object v, String n, IValidRuleConfig... c) {
		assert c != null;
		assert n != null;

		this.value = v;
		this.name = n;
		this.configs = c;
	}

	@Override
	public Object value() {
		return value;
	}

	@Override
	public String name() {
		return name;
	}

	@Override
	public IValidRuleConfig[] configs() {
		return configs;
	}

}
